{% extends "base.django.html" %}
{% block head_title %}All Photos{% endblock %}

{% block body_content %}
<div id='photoall_title'>
	<h1>All Photos</h1>
</div>

<div id='photoall'>
	{% if currentPage %}
		{% for p in currentPage.object_list %}
			<a class='thumbnail' href='{{ p.get_absolute_url }}'><img class='thumbnail' src='{{ p.get_image_thumbnail_url }}' title='{{ p.caption }}'/></a>
		{% endfor %}
	
		{% if user.is_authenticated %}
			<a class='thumbnail' href='{% url photo-add %}'><img class='thumbnail' src='/shell/media/img/app/add.png'/></a>
		{% endif %}
	{% else %}
		<p class='center'>There is no photo yet, do you wanna <a href='{% url photo-add %}'>upload</a> the first one?</p>
	{% endif %}
</div>

<div id='paginator'>
	<img src='/shell/media/img/app/page.png'/>
	{% for p in pageRange %}
		{% ifequal p currentPageNum %}
			<span class='currentpage'>{{ p }}</span>
		{% else %}
			<a href='{% url photoall-page p %}'>{{ p }}</a>
		{% endifequal %}
	{% endfor %}
</div>

{% endblock %}